export class HoverFilter {

    private passList: Map<string, number[]> = new Map();
    addPassList(modelName: string, dbids: number[]) {
        if (this.passList.has(modelName)) {
            this.passList.set(modelName, [...dbids, ...this.passList.get(modelName)!])
        } else {
            this.passList.set(modelName, dbids);
        }
    }
    judgePassed(modelName: string, dbid: number): boolean {
        if (!this.passList.has(modelName)) {
            return false;
        }
        if (this.passList.get(modelName)?.indexOf(dbid) == -1) {
            return false;
        }
        return true;
    }
    judgeFailed(modelName: string, dbid: number): boolean {
        return !this.judgePassed(modelName, dbid);
    }
}